package com.neutech.solar.entity;

import com.neutech.solar.constant.Constant;
import com.neutech.solar.util.ImageUtil;

import java.awt.*;

public class BackGround extends AbstractSolarSystemObject{
    public BackGround(String imgPath) {
        this();
        this.img = ImageUtil.getImage(imgPath);
    }
    public BackGround(int x,int y,String imgPath) {
        this.x = x;
        this.y = y;
        this.img = ImageUtil.getImage(imgPath);
    }
    public BackGround() {
        this.x = 0;
        this.y = 0;
        this.img = ImageUtil.getImage("星空背景.png");
    }



    @Override
    public void draw(Graphics g) {
        g.drawImage(img,x,y, Constant.WINDOW_WIDTH,Constant.WINDOW_HEIGHT,null);
    }
}
